#ifndef TINKERTOY_H
#define TINKERTOY_H

#include "ParticleSystem.h"
#include "ConstraintSystem.h"
#include "LinearSystemSolver.h"
#include "ODESolver.h"
#include <math.h>

class TinkerToy
{
public:
	TinkerToy(void);
	TinkerToy(double timestep, double alpha, double beta, int solverType=CONJUGATEGRADIENT);
	~TinkerToy(void);
	void AddParticle(double x, double y, bool onCircle=false, double vx=0, double vy=0);
	void AddConstraint(int indexA, int indexB);
	void TinkerInit();
	void TinkerUpdate();
	int GetParticle(double x, double y);

public:
	ParticleSystem *ps;
	ConstraintSystem *cs;
	LinearSystemSolver *ls;
	ODESolver *os;
	double timestep;
	Particle *origin;
};

#endif

